#ifndef __GlSpriteDescription_h__
#define __GlSpriteDescription_h__

#include <vector>
#include "GlPosition.h"
#include "GlSize.h"
#include "Utility.h"

namespace GraphicLibrary
{
	class SpriteDescription
	{
		public:
			typedef std::vector<Position>	PositionArray;

			inline SpriteDescription(const char *name, const char *texFileName, const Size &size, const float playTimeInSeconds)
				: mSize(size)
				, mName(Utility::copyStr(name))
				, mTexFileName(Utility::copyStr(texFileName))
				, mPlayTimeInSeconds(playTimeInSeconds)
			{}
			~SpriteDescription()
			{
				delete [] mName;
				delete [] mTexFileName;
			}
			inline void addFrame(const Position &pos)				{mFramePositions.push_back(pos);}
			inline const char* getName() const						{return mName;}
			inline const char* getTexFileName() const				{return mTexFileName;}
			inline const PositionArray& getFramePositions() const	{return mFramePositions;}
			inline const Size& getFrameSize() const					{return mSize;}
			inline float getPlayTimeInSeconds() const				{return mPlayTimeInSeconds;}
		private:
			PositionArray	mFramePositions;
			const Size		mSize;
			const char*		mName;
			const char*		mTexFileName;
			const float		mPlayTimeInSeconds;
	};
}

#endif // __GlSpriteDescription_h__
